/***************************************************************************
 *   Copyright (C) 2008 by Ivan Blagoev Topolsky   *
 *   ivan.topolsky@genebio.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 3 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU Library General Public     *
 *   License along with this program; if not, write to the                 *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/


#include <iostream>

#include "filterparse.h"

using namespace std;
using namespace xeno::merlin;

int main () {
	FilterParse 
		fp1(" + c Full ms [150.00-1000.00]"),
		fp2(" + c d Full ms2 179.15@cid35.00 [35.00-370.00]"),
		fp3(" + c sid=-10.00  Q1MS [100.00-900.00]"),
		fp4(" + c sid=-10.00  d Full ms2 100.98@cid-40.00 [30.00-105.98]"),
		fp5("ITMS + c NSI d Full ms2 543.30@cid35.00 [135.00-1100.00] "),
		fp6(" + c ESI sid=10.00  SRM ms2 415.200@cid23.00 [178.024-178.034, 301.015-301.025]"),
		fp7("ITMS + c ESI d w Full ms2 300.16@cid35.00 [70.00-615.00]");

	cout << fp1 << fp2 << fp3 << fp4 << fp5 << fp6 << fp7 << endl;

	cout << "1 [ScanType]:\t" << fp1["ScanType"] << endl;
	cout << "6 (SourceCID):\t" << fp6("SourceCID") << endl;
	cout << "7 (Energy):\t" << fp7("Energy") << endl;
	cout << "7 (MSLevel):\t" <<  fp7("MSLevel") << endl;
	cout << "5->Instrument:\t" << fp5.Instrument() << endl;
	cout << "5->ScanType:\t" << fp5.ScanType() << endl;
	cout << "3->SourceCID:\t" << fp3.SourceCID() << endl;
	cout << "4->MSLevel:\t" << fp4.MSLevel() << endl;
	cout << "3->MSLevel:\t" << fp3.MSLevel() << endl;
	
	cout << endl << "Finished." << endl;
	exit(0);
}
